home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 06 - 1990 / 06.07 Jul 90 / Commando Programming ƒ / Rezscripts / RezC.CNTL.Cmdo.R < prev    next >
Encoding:
Text File  |  1988-07-09  |  4.8 KB  |  202 lines  |  [TEXT/MPS ]

  1. /* File RezC.CNTL.Cmdo.R */
  2. /* Rez input for the Rezc.CNTL Commando interface */
  3. /* W. Powell 1988 */
  4.  
  5. /* Rez definitions for Rez-building Commando interfaces */
  6. #include "Types.r"
  7. #include "Cmdo.R"
  8.  
  9. Resource 'cmdo' (200) {
  10.     { 285,
  11.     "Rezc.CNTL produces Rez input for a Control resource",
  12.     {
  13. /* This include file has a standard arrangement of items
  14.  *   common to all resources: ID#, attributes, name, 
  15.  *      and redirection of output from the Rezc.≈ script        */
  16. #include "CmdoReztStart.R"
  17.  
  18. /* Set up parameters for a Rectangle entry area                */    
  19.     #define RTop 85
  20.     #define RLeft 30
  21.     #define RTit "Control Rectangle"
  22.     #define RDep {1}
  23. /* This include file has a standard arrangement of edit boxes
  24.  *   for input of rectangles                                */
  25. #include "CmdoRect.R"
  26.  
  27. /* other items particular to this case */    
  28.     /* Item 11 */
  29.     OR {{1}}, NestedDialog {
  30.         4, /* Dialog number */
  31.         {80,250,101,360},
  32.         "Control Type",
  33.         "Define control type, range and value" },
  34.     /* Item 12 */
  35.     OR {{1}}, TextTitle {
  36.         plain,
  37.         {85,365,101,460},
  38.         SystemFont,systemSize,
  39.         "(and setting)" },
  40.     /* Item 13 */
  41.     OR {{1}}, RadioButtons {{
  42.         {109,260,125,350},
  43.             "Visible","-V",NotSet,"Make control visible.",
  44.         {109,360,125,460},
  45.             "Invisible","-I",NotSet,"Make control invisible."
  46.         }},
  47.     /* Item 14 */
  48.     OR {{1}}, RegularEntry {
  49.         "RefCon:",
  50.         {134,270,150,330},
  51.         {134,340,150,440},
  52.         "",keepCase,"-const",
  53.         "User-defined constant.\nHEX long word." },
  54.     /* Item 15 */
  55.     OR {{1}}, RegularEntry {
  56.         "Label:",
  57.         {155,30,171,90},
  58.         {155,100,171,440},
  59.         "",keepCase,"-label",
  60.         "Control title or label." },
  61.     /* Item 16 */
  62.     AND {{6,7,8,9}}, DoItButton {},
  63.     }, 
  64. /* Dialog 2 */
  65. /* Include the standard resource attributes dialog */
  66. #include "CmdoReztAttr.R"
  67.  
  68. /* Dialog 3 */
  69. /* Include a redirection dialog */
  70. #include "CmdoReztRdir.R"
  71.  
  72. /* Dialog 4 */
  73. /* Control types and values */
  74.     275, 
  75.     "Define type of control and its range of settings.",
  76.     {
  77.     /* Item 1 */
  78.     /* A dummy for dependency logic */
  79.     NotDependent {}, CheckOption {
  80.         NotSet, {20,1000,36,1000},
  81.         "Title","","Not used" },
  82.     /* Item 2 */
  83.     OR {{1}}, NestedDialog {
  84.         4,
  85.         {20,20,36,80},
  86.         "Button","" },
  87.     /* Item 3 */
  88.     OR {{1}}, CheckOption {
  89.         Set,
  90.         {40,64,56,80},
  91.         "","","" },
  92.     /* Item 4 */
  93.     OR {{1}}, RadioButtons {{
  94.         {60,64,76,80},
  95.         "","",Set,"" }},
  96.     /* Item 5 */
  97.     NotDependent {}, PictOrIcon {
  98.         Picture, 200, 
  99.         {80,20,96,80}  },
  100.     /* Item 6 */ 
  101.     NotDependent {}, RadioButtons {{
  102.         {20,85,36,260},
  103.             "Button","-P",NotSet,
  104.             "Control type is a push button", 
  105.         {40,85,56,260},
  106.             "Check Box","-C",NotSet,
  107.             "Control type is a check box.",
  108.         {60,85,76,260},
  109.             "Radio Button","-R",NotSet,
  110.             "Control type is a radio button.",
  111.         {80,85,96,260},
  112.             "Scroll Bar","-S",NotSet,
  113.             "Control type is a scroll bar."
  114.         }},
  115.     /* Item 7 */
  116.     OR {{(1<<12)+6,(2<<12)+6,(3<<12)+6}}, RadioButtons {{
  117.         {40,300,56,400},
  118.             "System","",NotSet,
  119.             "Draw label in System font.",
  120.         {60,300,76,400},
  121.             "Window’s", "-W",NotSet,
  122.             "Draw label in window’s font."
  123.         }},
  124.     /* Item 8 */
  125.     NotDependent {}, TextBox {
  126.         gray,
  127.         {30,290,80,410},
  128.         "Label Font" },
  129.     /* Item 9 */
  130.     OR {{(1<<12)+6,(2<<12)+6,(3<<12)+6}}, RadioButtons {{
  131.         {110,335,126,380}, "Off","0",NotSet,
  132.             "Control is initially off (unset).",
  133.         {110,415,126,455},"On","1",NotSet,
  134.             "Control is initially on (set)."
  135.         }},
  136.     /* Item 10 */
  137.     OR {{-9}}, RegularEntry {
  138.         "Setting",
  139.         {139,335,155,395},
  140.         {139,395,155,452},
  141.         "",keepCase,"",
  142.         "Initial value or setting of control." },
  143.     /* Item 11 */
  144.     OR {{-9}}, RegularEntry {
  145.         "Minimum",
  146.         {139,25,155,88},
  147.         {139,93,155,153},
  148.         "",keepCase,"",
  149.         "Minimum of control range." },
  150.     /* Item 12 */
  151.     OR {{-9}}, RegularEntry {
  152.         "Maximum",
  153.         {139,165,155,235},
  154.         {139,240,155,300},
  155.         "",keepCase,"",
  156.         "Maximum of control range." },
  157.     /* Item 13 */
  158.     OR {{9}}, RadioButtons {{
  159.         {20,1000,36,1100},
  160.         "Minimum","0",NotSet,"Not Seen" }},
  161.     /* Item 14 */
  162.     OR {{9}}, RadioButtons {{
  163.         {20,1000,36,1100},
  164.         "Maximum","1",NotSet, "Not Seen" }},
  165.     /* Item 15 */
  166.     NotDependent {}, TextBox {
  167.         gray,
  168.         {100,330,166,460},
  169.         "Setting" },
  170.     /* Item 16 */
  171.     NotDependent {}, TextBox {
  172.         gray, 
  173.         {130, 20,166,460},
  174.         "Range" },
  175.     },
  176. }
  177. }; 
  178.  
  179. /* Picture of Scroll Bar */
  180. resource 'PICT' (200) {
  181.     251,
  182.     {49, 122, 64, 183},
  183.     $"1101 A000 82A0 008C 0100 0A00 0000 0002"
  184.     $"D002 4009 0000 0000 0000 0000 3100 3100"
  185.     $"7A00 4000 B709 FFFF FFFF FFFF FFFF 3809"
  186.     $"8822 8822 8822 8822 3100 3100 8500 4000"
  187.     $"AC09 FFFF FFFF FFFF FFFF 3809 0000 0000"
  188.     $"0000 0000 3100 3200 9000 3F00 9E09 FFFF"
  189.     $"FFFF FFFF FFFF 38A0 008E 9000 0200 3300"
  190.     $"7800 3F00 8800 3300 7A00 3F00 8600 3300"
  191.     $"7A00 3F00 8600 0100 0001 8002 8004 FC08"
  192.     $"0410 0410 0408 0404 FC02 8001 8000 00A0"
  193.     $"008F A000 8E01 000A 0033 00A9 02D0 0240"
  194.     $"9000 0200 0000 0000 0D00 1000 0000 0000"
  195.     $"0D00 0E00 3300 A900 4000 B700 0100 0001"
  196.     $"8001 403F 2020 1020 0820 0820 103F 2001"
  197.     $"4001 8000 0000 00A0 008F A000 8DA0 0083"
  198.     $"FF"
  199. };
  200.  
  201.     
  202.